package com.forum.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.forum.dao.UserTabDao;
import com.forum.entity.UserTabEntity;
import com.forum.service.UserTabService;
import com.forum.utils.MyQuery;
import com.forum.utils.PageUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

/**
 * @ClassNameUserTabServiceImpl
 * @Author 张继成
 * @Date 2023/11/13 16:31
 */
@Service("UserTabService")
public class UserTabServiceImpl extends ServiceImpl<UserTabDao, UserTabEntity> implements UserTabService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        return null;
    }

    @Override
    public List<UserTabEntity> selectListView(Wrapper<UserTabEntity> wrapper) {
        return baseMapper.selectListView(wrapper);
    }

    @Override
    public PageUtils queryPage(Map<String, Object> parms, Wrapper<UserTabEntity> wrapper) {
        Page<UserTabEntity> page = new MyQuery<UserTabEntity>(parms).getPage();
        page.setRecords(baseMapper.selectListView(page,wrapper));
        PageUtils pageUtil = new PageUtils(page);
        return pageUtil;
    }

}
